<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery-3.1.1.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    ul li {
        list-style-type: none;
    }

    #cc {
        width: 650px;
        height: 250px;
        margin: 100px auto;
        position: relative;
    }

    #aa {
        width: 100%;
        font-size: 0;
        position: absolute;
        z-index: 1;
    }

    #aa>li {
        float: right;
        position: absolute;
    }
    #aa>.ff{
        z-index: 1;
    }
    #bb {
        position: absolute;
        bottom: 5px;
        right: 10px;
        z-index: 2;
    }

    #bb>li {
        float: left;
        width: 30px;
        height: 30px;
        margin-left: 5px;
        line-height: 30px;
        text-align: center;
        border: 2px solid white;
    }

    #bb>.dd {
        padding: 2px;
        margin-top: -4px;
    }
</style>

<body>
    <div id="cc">
        <ul id="aa">
            <li class="ff">
                <img src="./01.jpg">
            </li>
            <li>
                <img src="./02.jpg">
            </li>
            <li>
                <img src="./03.jpg">
            </li>
            <li>
                <img src="./04.jpg">
            </li>
            <li>
                <img src="./05.jpg">
            </li>
        </ul>
        <ul id="bb">
            <li>1</li>
            <li>2</li>
            <li>3</li>
            <li>4</li>
            <li>5</li>
        </ul>
    </div>

</body>
<script>
    $(document).ready(function () {
        let zI = 1;
        $('#bb>li').mouseover(function () {
            ++zI;
            $(this).addClass('dd').siblings().removeClass('dd');
            console.log(zI)
            $('#aa>li').eq($('#bb>li').index($(this))).css({
                left:650 + 'px',
                zIndex:zI
            }).stop().animate({
                left:0 + 'px'
            },3000)
        })
        $('#bb>li').mouseout(function(){
            $(this).removeClass('dd');
        })
    })
</script>

</html>